Input





For this week we tried input devices, I decided to use the sonar sensor. As this was my first time trying it I took the files from the CBA site, this time it was easier and faster.
While milling the board I realized someone had put the wrong mill in the wrong tray so I had to do it again. No worries.
Changed the mill and everything was ok, the board came out very nice. This time picking the components wasn't so hard as I am familiar with some of them.







Soldering was smooth until I got to the sonar component: I don't know if there is a component with the pins in the other side but I think I grabed a component that had the pins in the back, I decided not to bend the pins as in the picture pf the site and instead solder it backwards.
this was quite difficult as the ground is opposite of the circular pieces in the component.




I got it after several attempts.





Programing was quite tricky because my computer did not had the proper programs installed, I had to upgrade Python, download PIP and also AVR in order to communicate with the programmer.







I used the programmer in the shop, the AVR IST2, with the help of Po Hao and the guide from embeded programming - which is very hard to find- http://academy.cba.mit.edu/classes/embedded_programming/hello.ftdi.44.program.png







After programming the board the Python part was fairly easy, you just have to wach out for the names of the files because sometimes they can be in the wronk folder etc.


This is what I undestood of the process:

1- Indicate the usb port you have connected your programmer to, in my case the port I was using was /dev/tty.usb* and the programmer was the AVR IST2

2- copy command for make file

3- change file name

4- make

5- fuse

6- if everything is ok you won't need the programmer anymore as it has recieved the .c file and now know what to do with every pin.

7- ask for Python (you will have to have PIP installed)

8- Copy the .PY file after the python command, python will act as an interface between what the microprocessor is recieving and sensing and will convertir into the information you will get in the display.

This process was very tricky as I had to download a lot of complements in my computer, update my computer and make a lot of changes on my filing system.

Finally, after using the python command, I got the display with the measurements of the sonar, it was an amazing experience as I had not been able to program anything so far.







However, the measurements where not very accurate, I don't know if this is because of external noise, if it is working in different paces, or my soldering was not very solid.
I will try to check this out in this couple days.
Tough, but good week.